<?php
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});
//基础工具
Route::group( function (){
    Route::post('tools/uploadpic', 'v1.Tools/uploadpic');//上传
    Route::post('tools/uploadpicmore', 'v1.Tools/uploadpicmore');//多图上传
    Route::get('tools/uploadpicmore', 'v1.Tools/uploadpicmore');//多图上传
})->allowCrossDomain();
//基础数据
Route::group( function (){
    Route::get('basedata/userlist', 'v1.BaseData/userlist');//获取用户列表
})->allowCrossDomain();
//用户
Route::group( function (){
    Route::get('user/getUserInfo', 'v1.User/getUserInfo');//获取用户信息
    Route::post('user/bindUser', 'v1.User/bindUser');//绑定禅道用户
    Route::get('user/manageList', 'v1.User/manageList');//管理员用户列表
    Route::post('user/addManageUser', 'v1.User/addManageUser');//添加管理员用户
    Route::get('user/delManageUser', 'v1.User/delManageUser');//删除管理员用户

    Route::get('user/userList', 'v1.User/userList');//禅道用户列表
    Route::post('user/addUser', 'v1.User/addUser');//添加禅道用户
    Route::post('user/saveUser', 'v1.User/saveUser');//编辑禅道用户
    Route::get('user/delUser', 'v1.User/delUser');//删除禅道用户
    //
})->allowCrossDomain();
//项目
Route::group( function (){
    Route::get('project/projectlistpage', 'v1.Project/projectlistpage');//项目列表（带分页）
    Route::get('project/projectlistpagewithchage', 'v1.Project/projectlistpagewithchage');
    Route::get('project/findProjectNo', 'v1.Project/findProjectNo');//检查项目编号的重复问题
    Route::post('project/add', 'v1.Project/add');//项目立项
    Route::get('project/detail', 'v1.Project/detail');//项目详情
    Route::get('project/del', 'v1.Project/del');//删除项目
    Route::post('project/set/status', 'v1.Project/projectsetstatus');//设置项目状态
    Route::post('project/edit', 'v1.Project/edit');//项目编辑
    Route::post('project/del', 'v1.Project/del');//删除项目
    Route::get('project/meeting/list', 'v1.Project/meetinglist');//会议事项列表
    Route::post('project/meeting/add', 'v1.Project/meetingadd');//会议事项添加
    Route::post('project/meeting/edit', 'v1.Project/meetingedit');//会议事项编辑
    Route::get('project/meeting/set/status', 'v1.Project/setmeetingstatus');//会议事项状态设置
    Route::get('project/meeting/del', 'v1.Project/meetingdel');//会议事项删除
    Route::post('project/setProjectCheck', 'v1.Project/setProjectCheck');//设置项目是否参与考核
})->allowCrossDomain();
//基础设置
Route::group( function () {
    Route::get('project/list', 'v1.Project/projectlist');//获取禅道项目列表
    Route::get('project/getStageCurrInfo', 'v1.Project/getStageCurrInfo');//根据类别id获取当前阶段信息
    Route::get('project/projectlist', 'v1.Project/projecMytlist');//获取项目列表
    Route::post('project/project/stage/chagestatus', 'v1.Project/setprojectstagestatus');//改变当前阶段的状态
    Route::get('project/getStageTimeByStage', 'v1.Project/getStageTimeByStage'); //更加项目id和阶段id获取阶段信息

    Route::get('project/class/list', 'v1.Project/classlist');//项目类别列表
    Route::post('project/class/save', 'v1.Project/saveclass');//项目类别新增/编辑
    Route::get('project/class/del', 'v1.Project/delclass');//项目类别删除

    Route::get('project/stage/list', 'v1.Project/stageclass');//项目阶段列表
    Route::post('project/stage/save', 'v1.Project/savestage');//项目阶段新增/编辑
    Route::get('project/stage/del', 'v1.Project/delstage');//项目阶段删除

    Route::get('project/classstage/displaylist', 'v1.Project/classstagedisplaylist');//项目配置总览
    Route::get('project/classstage/list', 'v1.Project/classstagelist');//选择类别配置列表
    Route::get('project/classstage/setstatus', 'v1.Project/setclassstage');//设置配置状态
    Route::post('project/classstage/save', 'v1.Project/saveclassstage');//项目类别配置新增/编辑
    Route::get('project/classstage/del', 'v1.Project/delclassstage');//项目类别配置删除
})->allowCrossDomain();
//工作
Route::group( function (){
    Route::get('work/week/weeksdisplay', 'v1.Statistics/weeksdisplay'); //周报总览
    Route::get('work/week/preweekdeail', 'v1.Week/preweekdeail'); //获取当周本周周报内容
    Route::get('work/week/list', 'v1.Week/weeklist');
    Route::post('work/week/add', 'v1.Week/weekadd');
    Route::get('work/week/detail', 'v1.Week/weekdetail');
    Route::post('work/week/save', 'v1.Week/weeksave');
    Route::get('work/week/del', 'v1.Week/weekdel');

    Route::get('work/month/list', 'v1.Month/monthlist');
    Route::post('work/month/add', 'v1.Month/monthadd');
    Route::get('work/month/detail', 'v1.Month/monthdetail');
    Route::post('work/month/save', 'v1.Month/monthsave');
    Route::get('work/month/del', 'v1.Month/monthdel');
})->allowCrossDomain();
//绩效管理
Route::group( function (){
    Route::get('task/createReviewResult', 'v1.Task/createReviewResult');//一键生成快递单
    Route::get('task/lockReivewResult', 'v1.Task/mlockReivewResult');//一键锁定考核单
    Route::get('task/createDepartBaseScore', 'v1.Task/createDepartBaseScore'); //创建部分基础分
    Route::get('task/getProjectOrProjectPmScore', 'v1.Task/getProjectOrProjectPmScore'); //自动处理项目经理激励分
    Route::get('task/getProjectOrProjectTeamScore', 'v1.Task/getProjectOrProjectTeamScore'); //自动处理项目成员分
    Route::post('PerOrgPeople/findreviewedpeoplelist', 'v1.PerOrgPeople/findreviewedpeoplelist');//根据当前人uid获取被考核人列表
    Route::post('PerOrgPeople/findreviewedpeoplefrom', 'v1.PerOrgPeople/findreviewedpeoplefrom');//根据当前考核人uid获取考核单
    Route::post('PerOrgPeople/setSpotScore', 'v1.PerOrgPeople/setSpotScore');
    Route::post('PerOrgPeople/createDepartAvgScoreApi', 'v1.PerOrgPeople/createDepartAvgScoreApi');
    Route::get('PerOrgPeople/setAllSpotScore', 'v1.PerOrgPeople/setAllSpotScore');
    Route::post('PerOrgPeople/selectLevlScore', 'v1.PerOrgPeople/selectLevlScore'); //查询分值
    Route::post('PerOrgPeople/selectProjectTeamersScore', 'v1.PerOrgPeople/selectProjectTeamersScore');
    Route::post('PerOrgPeople/projectTeamList', 'v1.PerOrgPeople/projectTeamList'); //根据项目id查询项目成员列表
    Route::get('PerOrgPeople/scoreSort', 'v1.PerOrgPeople/scoreSort'); //绩效总览
    Route::post('PerOrgPeople/projectTeamReviewList', 'v1.PerOrgPeople/projectTeamReviewList');
    Route::post('PerOrgPeople/projectTeamReviewAdd', 'v1.PerOrgPeople/projectTeamReviewAdd');
    Route::get('PerOrgPeople/projectTeamReviewDel', 'v1.PerOrgPeople/projectTeamReviewDel');
    Route::get('Performance/getPerformanceCreateList', 'v1.Performance/getPerformanceCreateList');
    Route::get('Performance/getPerformanceLockList', 'v1.Performance/getPerformanceLockList');
    Route::get('Performance/getPerformanceListdisplay', 'v1.Performance/getPerformanceListdisplay');
    Route::get('PerOrgPeople/getPeopleReviewResultList', 'v1.PerOrgPeople/getPeopleReviewResultList');
})->allowCrossDomain();
//绩效分类
Route::group( function (){
    Route::get('performance/class/performanceClassList', 'v1.PerformanceClass/performanceClassList');//绩效分类列表
    Route::post('performance/class/addPerformanceClass', 'v1.PerformanceClass/performanceAdd');//绩效分类添加
    Route::post('performance/class/savePerformanceClass', 'v1.PerformanceClass/performanceSave');//绩效分类编辑
    Route::get('performance/class/delPerformanceClass', 'v1.PerformanceClass/delPerformanceClass');//删除绩效分类
})->allowCrossDomain();
//绩效考核项
Route::group( function (){
    Route::get('performance/content/performanceContentList', 'v1.PerformanceContent/performanceContentList');//绩效分类列表
    Route::post('performance/content/addPerformanceContent', 'v1.PerformanceContent/performanceContentAdd');//绩效分类添加
    Route::post('performance/content/savePerformanceContent', 'v1.PerformanceContent/performanceContentSave');//绩效分类编辑
    Route::get('performance/content/delPerformanceContent', 'v1.PerformanceContent/delPerformanceContent');//删除绩效分类
})->allowCrossDomain();
//绩效考核点
Route::group( function (){
    Route::get('performance/spot/performanceSpotList', 'v1.PerformanceSpot/performanceSpotList');//绩效分类列表
    Route::post('performance/spot/addPerformanceSpot', 'v1.PerformanceSpot/performanceSpotAdd');//绩效分类添加
    Route::post('performance/spot/savePerformanceSpot', 'v1.PerformanceSpot/performanceSpotSave');//绩效分类编辑
    Route::get('performance/spot/delPerformanceSpot', 'v1.PerformanceSpot/delPerformanceSpot');//删除绩效分类
})->allowCrossDomain();
//考核组织关系
Route::group( function (){
    Route::get('per/org/orgList', 'v1.PerOrg/orgList');//考核组织列表
    Route::get('per/org/orgListTj', 'v1.PerOrg/orgListTj');//depart_spot为1的组织架构列表
    Route::post('per/org/addOrg', 'v1.PerOrg/addOrg');//考核组织新增
    Route::post('per/org/saveOrg', 'v1.PerOrg/saveOrg');//考核组织编辑
    Route::get('per/org/delOrg', 'v1.PerOrg/delOrg');//删除考核组织
})->allowCrossDomain();
//考核组织人员管理
Route::group( function (){
    Route::get('per/org/people/peopleList', 'v1.PerOrgPeople/peopleList');//考核组织人员列表
    Route::get('per/org/people/peopleListTj', 'v1.PerOrgPeople/peopleListTj');//
    Route::post('per/org/people/addPeople', 'v1.PerOrgPeople/addPeople');//考核组织人员新增
    Route::post('per/org/people/savePeople', 'v1.PerOrgPeople/savePeople');//考核组织人员编辑
    Route::get('per/org/people/delPeople', 'v1.PerOrgPeople/delPeople');//删除考核组织人员
})->allowCrossDomain();
//任务配置
Route::group( function (){
    Route::get('task/config/taskList', 'v1.TaskConfig/taskList');//考核组织人员列表
    Route::post('task/config/addTask', 'v1.TaskConfig/addTask');//考核组织人员新增
    Route::post('task/config/saveTask', 'v1.TaskConfig/saveTask');//考核组织人员编辑
    Route::get('task/config/delTask', 'v1.TaskConfig/delTask');//删除考核组织人员
})->allowCrossDomain();
//任务
Route::group( function (){
    Route::get('task/test', 'v1.Task/test');//测试任务
    Route::get('task/test2', 'v1.Task/createReviewResult');//测试任务
    Route::get('task/sendReviewMsg', 'v1.Task/sendReviewMsg');//推送评审任务
    Route::get('ProjectTask/sendEsbMsg', 'v1.ProjectTask/sendEsbMsg');
    Route::get('tmp/updateProjectTeamScore','v1.Tmp/updateProjectTeamScore');
})->allowCrossDomain();
//总览
Route::group( function (){
    Route::get('statistics/allprojectlist', 'v1.Statistics/allprojectlist');//所有项目总览
    Route::get('statistics/allprojectTip', 'v1.Statistics/allprojectTip');//项目情况提示
})->allowCrossDomain();

//导入导出接口
Route::group( function (){
    Route::get('test/index', 'v1.Test/index');
    Route::get('test/inserExcel', 'v1.Test/inserExcel');
    Route::get('test/inserExcelM', 'v1.Test/inserExcelM');
    Route::get('test/inserExcelC', 'v1.Test/inserExcelC');
    Route::get('test/finddata', 'v1.Test/finddata');
})->allowCrossDomain();

//权限相关接口
Route::group( function (){
    Route::get('domains/domainslist', 'v1.Domains/domainslist'); //域列表
    Route::post('domains/domainsadd', 'v1.Domains/domainsadd'); //域新增
    Route::post('domains/domainsedit', 'v1.Domains/domainsedit'); //域保存
    Route::post('domains/domainssetstatus', 'v1.Domains/domainssetstatus'); //域禁用
    Route::get('domains/domainsdel', 'v1.Domains/domainsdel'); //域删除

    Route::get('roles/roleslist', 'v1.Roles/roleslist'); //角色列表
    Route::post('roles/rolesadd', 'v1.Roles/rolesadd'); //角色新增
    Route::post('roles/rolesedit', 'v1.Roles/rolesedit'); //角色保存
    Route::post('roles/rolessetstatus', 'v1.Roles/rolessetstatus'); //角色禁用
    Route::get('roles/rolesdel', 'v1.Roles/rolesdel'); //角色删除

    Route::get('policy/policylist', 'v1.Policy/policylist'); //规则列表
    Route::post('policy/policyadd', 'v1.Policy/policyadd'); //规则新增
    Route::post('policy/policyedit', 'v1.Policy/policyedit'); //规则保存
    Route::post('policy/policysetstatus', 'v1.Policy/policysetstatus'); //规则禁用
    Route::get('policy/policydel', 'v1.Policy/policydel'); //规则删除

    Route::get('relation/domainsroleslist', 'v1.DomainsRolesRelation/domainsroleslist'); //域-角色绑定关系列表
    Route::post('relation/domainsrolesadd', 'v1.DomainsRolesRelation/domainsrolesadd'); //域-角色绑定
    Route::post('relation/domainsrolesedit', 'v1.DomainsRolesRelation/domainsrolesedit'); //域-角色绑定关系修改
    Route::post('relation/domainssetstatus', 'v1.DomainsRolesRelation/domainsrolessetstatus'); //域-角色绑定关系禁用
    Route::get('relation/domainsrolesdel', 'v1.DomainsRolesRelation/domainsrolesdel'); //域-角色绑定关系删除

    Route::get('relation/policylist', 'v1.RolesPolicy/policylist'); //角色-规则绑定关系列表
    Route::post('relation/policyadd', 'v1.RolesPolicy/policyadd'); //角色-规则绑定
    Route::post('relation/policyedit', 'v1.RolesPolicy/policyedit'); //角色-规则绑定关系修改
    Route::post('relation/policysetstatus', 'v1.RolesPolicy/policysetstatus'); //角色-规则帮绑定关系禁用
    Route::get('relation/policydel', 'v1.RolesPolicy/policydel'); //角色-规则绑定关系删除Performance
})->allowCrossDomain();

//测试接口
Route::group( function (){
    Route::get('test/peopleListTj_dao', 'v1.PerOrgPeople/peopleListTj_dao');
})->allowCrossDomain();
Route::miss('public/miss');